package dnl.dtools.grm.operations.io;

import java.io.IOException;

import dnl.dtools.grm.Resource;
import dnl.dtools.grm.operations.ResourceOperationException;
import dnl.dtools.grm.operations.SimpleResourceOperation;

/**
 * 
 * @author daniel
 */
public class LocalFsDeleteOperation extends SimpleResourceOperation {

	public LocalFsDeleteOperation(Resource[] resources) {
		super(resources);
	}

	@Override
	public void operate() throws ResourceOperationException {
		for (int i = 0; i < resources.length; i++) {
			//LocalFileSystemEntry r = (LocalFileSystemEntry) resources[i];
			try {
				resources[i].delete();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}

}
